﻿
namespace Thor.WebRole.Services
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.ComponentModel.DataAnnotations;
    using System.Configuration;
    using System.IO;
    using System.Linq;
    using System.Web.DomainServices;
    using System.Web.Ria;
    using System.Web.Ria.Services;
    using Thor.Common;

    [EnableClientAccess()]
    public class ProviderManagerDomainService : DomainService
    {
        public ProviderInfo GetProvider()
        {
            return new ProviderInfo();
        }

        public IQueryable<ProviderAssembly> GetAssemblies()
        {
            return ProviderHelper.GetManager().Assemblies.AsQueryable();
        }

        public void InsertProvider(ProviderInfo provider)
        {
            ProviderHelper.GetManager().Insert(provider);
        }

        public void UpdateProvider(ProviderInfo provider)
        {
            ProviderHelper.GetManager().Update(provider);
        }

        public void DeleteProvider(ProviderInfo provider)
        {
            ProviderHelper.GetManager().Delete();
        }
    }
}


